package com.lishilin.gulimall.ware.feign;

import com.lishilin.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "gulimall-product")
public interface ProductFeignService {
    /**
     * /product/spuinfo/info/{id}这个是给@FeignClient(value = "gulimall-product")发送请求
     * /api/product/spuinfo/info/{id} 也可以给@FeignClient(value = "gulimall-gateway")网关发送请求，再由网关转发至product服务
     * @param id
     * @return
     */
    @RequestMapping("/product/spuinfo/info/{id}")
    public R info(@PathVariable("id") Long id);

}
